#!/bin/sh

mkdir -p root
echo '# Remove this file to restore default settings.

fact5Command = gtklp %f
' > root/.mtpaint

#==============================

mkdir -p usr/bin
echo '#!/bin/sh

export TEXTDOMAIN=mtpaintsnapshot #usr_sbin
export OUTPUT_CHARSET=UTF-8

yaf-splash -placement center -bg "#ff00ff" -timeout 10 -close box -text "$(gettext "mtPaint screen snapshot utility

There will now be a pause of 15 seconds to allow you to adjust windows as you wish, then a snapshot will be taken of entire screen.

Note, you can also take a snapshot of the main menu. Close this window, open the main menu to the desired layout, then wait until the 13 seconds has expired.")" &

sleep 15
exec mtpaint -s' > usr/bin/mtpaintsnapshot.sh
chmod +x usr/bin/mtpaintsnapshot.sh

#==============================

mkdir -p usr/share/applications

cat > usr/share/applications/mtpaint.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Name=mtPaint image editor
Icon=mtpaint.png
Comment=mtPaint image editor
Exec=mtpaint
Terminal=false
Type=Application
Categories=RasterGraphics
GenericName=mtPaint image editor
EOF

cat > usr/share/applications/mtPaint-snapshot-screen-capture.desktop.desktop <<EOF
[Desktop Entry]
Encoding=UTF-8
Name=mtPaint-snapshot screen capture
Icon=/usr/share/pixmaps/puppy/photocamera.svg
Comment=mtPaint-snapshot screen capture
Exec=mtpaintsnapshot.sh
Terminal=false
Type=Application
Categories=X-GraphicUtility
GenericName=mtPaint-snapshot screen capture
EOF

